import { IMenuButtonItem, IMenuSelectorItem, MenuItemType } from '@univerjs/ui';
import {
  JnpfSheetsInsertBarEchartOperation,
  JnpfSheetsInsertLineEchartOperation,
  JnpfSheetsInsertPieEchartOperation,
  JnpfSheetsInsertRadarEchartOperation,
} from '../../commands/operations/sheet-echart.operation';
import { JnpfCommandIds } from '../../utils/define';

export const JnpfSheetsEchartMenuFactory = (): IMenuSelectorItem => {
  return {
    id: JnpfCommandIds.echartOperations,
    type: MenuItemType.SUBITEMS,
    icon: 'SystemSingle',
    tooltip: 'jnpfSheetEchartMenu.tooltip',
  };
};

export const JnpfSheetsInsertBarEchartMenuFactory = (): IMenuButtonItem => {
  return {
    id: JnpfSheetsInsertBarEchartOperation.id,
    type: MenuItemType.BUTTON,
    icon: 'ChartSingle',
    tooltip: 'jnpfSheetInsertBarEchartMenu.tooltip',
    title: 'jnpfSheetInsertBarEchartMenu.title',
  };
};

export const JnpfSheetsInsertLineEchartMenuFactory = (): IMenuButtonItem => {
  return {
    id: JnpfSheetsInsertLineEchartOperation.id,
    type: MenuItemType.BUTTON,
    icon: 'LineChartSingle',
    tooltip: 'jnpfSheetInsertLineEchartMenu.tooltip',
    title: 'jnpfSheetInsertLineEchartMenu.title',
  };
};

export const JnpfSheetsInsertPieEchartMenuFactory = (): IMenuButtonItem => {
  return {
    id: JnpfSheetsInsertPieEchartOperation.id,
    type: MenuItemType.BUTTON,
    icon: 'PieChartSingle',
    tooltip: 'jnpfSheetInsertPieEchartMenu.tooltip',
    title: 'jnpfSheetInsertPieEchartMenu.title',
  };
};

export const JnpfSheetsInsertRadarEchartMenuFactory = (): IMenuButtonItem => {
  return {
    id: JnpfSheetsInsertRadarEchartOperation.id,
    type: MenuItemType.BUTTON,
    icon: 'RadarChartSingle',
    tooltip: 'jnpfSheetInsertRadarEchartMenu.tooltip',
    title: 'jnpfSheetInsertRadarEchartMenu.title',
  };
};
